package com.cli.spring_session_demo.error;

/**
 * Created by work on 2017/5/31.
 * http response when error occurred
 */
public class ErrorResponse {
    private String errorCode;
    private String description;
    private String message;

    public ErrorResponse(ErrorCode errorCode, String message) {
        this.errorCode = errorCode.getErrorCode();
        this.description = errorCode.getDescription();
        this.message = message;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public String getDescription() {
        return description;
    }

    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "ErrorResponse{" +
                "errorCode='" + errorCode + '\'' +
                ", description='" + description + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
